<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>

    <script>

        // var time = new Date(2002,1,23,11,22,18)
        var time = new Date()

            console.log(time);
            document.write(time+"<br>")
            document.write(time.getFullYear()+"<br>")
            document.write(time.getMonth()+"<br>")
            document.write(time.getDate()+"<br>")
            document.write(time.getHours()+"<br>")
            document.write(time.getMinutes()+"<br>")
            document.write(time.getSeconds()+"<br>")

            // 星期几
            document.write(time.getDay()+"<br>")
            // 时间搓
            document.write(time.getTime()+"<br>")

            // 设置时间 set  



    </script>

    
</body>
</html>